#ifndef FILEUTIL_H
# define FILEUTIL_H

#include "core.h"
#include "logs/log.h"

// -------------------------------- FILE 
long flength(FILE *fp);
int frowcount(FILE *fp);
int freadline(FILE *fp, char *buffer);

// can't use of /proc file path
size_t freadall(FILE *fp, char *buffer);

// -------------------------------- Wrap
long FileLength(const char* path);
int FileRowCount(const char* path);

// -------------------------------- Custom
bool FileExists(const char *path);
bool FileCreateEmpty(const char *path);

// -- 
long FileReadToBuffer(const char *path, char *buffer, size_t len);
long FileWirteWithBuffer(const char *path, char *buffer, size_t len);

#endif